#!/bin/bash
node=(
k8s-master1
k8s-master2
k8s-master3
k8s-node1
k8s-node2
)
for node in ${node[@]};do
echo $node
scp -r /etc/hosts root@$node:/etc/hosts >/dev/null 2>&1 
done
